﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects;

namespace SCMS.Model
{
    public static class SalaryRequestExtensions
    {
        public static IQueryable<SalaryRequest> IncludeCurrency(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Currency");
        }

        public static IQueryable<SalaryRequest> IncludeStaff(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Staff.Person");
        }

        public static IQueryable<SalaryRequest> IncludeStaffDesignation(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Staff.Designation");
        }

        public static IQueryable<SalaryRequest> IncludeStaff1(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Staff1.Person");
        }

        public static IQueryable<SalaryRequest> IncludeStaff1Designation(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Staff1.Designation");
        }

        public static IQueryable<SalaryRequest> IncludeStaff2(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Staff2.Person");
        }

        public static IQueryable<SalaryRequest> IncludeStaff2Designation(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("Staff2.Designation");
        }

        public static IQueryable<SalaryRequest> IncludeSalaryRequestBudgetLines(this IQueryable<SalaryRequest> queryable)
        {
            return ((ObjectQuery<SalaryRequest>)queryable).Include("SalaryBudgetlines");
        }

        public static IQueryable<SalaryBudgetline> IncludeProjectDonor(this IQueryable<SalaryBudgetline> queryable)
        {
            return ((ObjectQuery<SalaryBudgetline>)queryable).Include("ProjectBudget.BudgetCategory.ProjectDonor");
        }

        public static IQueryable<SalaryBudgetline> IncludeProjectBudget(this IQueryable<SalaryBudgetline> queryable)
        {
            return ((ObjectQuery<SalaryBudgetline>)queryable).Include("ProjectBudget");
        }


        public static IQueryable<SalaryBudgetline> IncludeSalaryRequest(this IQueryable<SalaryBudgetline> queryable)
        {
            return ((ObjectQuery<SalaryBudgetline>)queryable).Include("SalaryRequest");
        }
    }
}
